FROM tomcat:9
RUN apt-get update && apt-get install unzip
RUN set -ex \
	&& rm -rf /usr/local/tomcat/webapps/* \
	&& chmod a+x /usr/local/tomcat/bin/*.sh
COPY webapps/struts2-showcase-2.5.29.war /tmp/
RUN unzip /tmp/struts2-showcase-2.5.29.war -d /usr/local/tomcat/webapps/struts2-showcase-2.5.29/
COPY listSkills.jsp /usr/local/tomcat/webapps/struts2-showcase-2.5.29/WEB-INF/empmanager/
CMD ["catalina.sh", "stop"]
CMD ["catalina.sh", "run"]
EXPOSE 8080